<html>

<head></head>

<body>
    <div id="app">
    </div>

    <script src="https://unpkg.com/vue"></script>
    <script>
        var appTemplateFactory = {
            build: function () {
                return '<p style="color:red;">Hello app </p>'
            }
        }

        var testTemplateFactory = {
            build: function () {
                return '<p style="color:blue;">Hello test </p>'
            }
        }

        var buildApp = function () {
            var factory = testTemplateFactory;
            var template = factory.build()
            return new Vue({
                el: '#app',
                template: template
            })
        }

        buildApp()
    </script>
</body>

</html>